home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
music
/
eked-m1.zoo
/
src
/
types.h
< prev
next >
Wrap
Text File
|
1995-02-19
|
5KB
|
144 lines
/*
* EKED-M1 : Editor for Korg M1 synth; types.h : global typedefs
* Copyright (C) 1995 Steven M. Eker (Steven.Eker@brunel.ac.uk)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
typedef char BOOL;
typedef signed char BYTE;
typedef unsigned char UBYTE;
typedef enum {
/*
* Regular (single byte) parameter types (handled via attribute table)
*/
UNUM, /* unsigned number 0..99 */
UN3, /* unsigned number 0..3 */
SNUM, /* signed number -99..99 */
SN12, /* signed number -12..12 */
SN50, /* signed number -50..50 */
MSND, /* multisound 0..? */
OCT, /* octave -1,0,1 (16', 8', 4') */
NOTE, /* note number 0..127 (C1 .. G9) */
OMOD, /* oscillator mode 0,1,2 (single, double, drum) */
/*
* Types needed for global parameters
*/
POL, /* polarity 0, 1 (+, -) */
PED, /* pedal function 0..9 (lengthy options) */
SCAL, /* scale type 0..4 (lengthy options) */
KEY, /* key 0..11 (C, C#, D,..., A#, B) */
DSND, /* drum sound 0..44 (0 is OFF) */
DKEY, /* drum key 12..115 (C0 .. G8) */
S120, /* signed number -120 .. 120 */
/*
* Types needed for effect & combination parameters
*/
VEL, /* velocity 1..127 */
REV1, /* reverb time 0..97 ( * 0.1 + 0.2 seconds) */
REV2, /* reverb time 0..47 ( * 0.1 + 0.2 seconds) */
ERT1, /* early reflect time 0..70 ( * 10 + 100 milliseconds) */
ERT2, /* early reflect time 0..30 ( * 10 + 100 milliseconds) */
UN9, /* unsigned number 0..9 */
SN10, /* signed number -10..10 */
BAL, /* balance 0..100 (dry:eff, 0:100 to 100:0) */
PAN, /* panpot 0..101 (OFF, R, 01:99 to 99:01, L) */
LFC, /* lo freq cutoff 0..2 (0.25, 0.5, 1 KHz) */
HFC, /* hi freq cutoff 0..2 (1, 2, 4 KHz) */
DEL1, /* delay or pre-delay 0..50 (milliseconds) */
/*
* The following need to be handled as unsigned bytes
*/
DEL2, /* delay or pre-delay 0..150 (milliseconds) */
DEL3, /* delay or pre-delay 0..200 (milliseconds) */
SPED, /* speed 0..216 (complex mapping) */
/*
* Irregular (bit/multi-byte) parameter types (handled via custom code)
*/
PROG, /* program number 0..199 (but may go to -1 for OFF) */
WAVE, /* waveform 0..3 (triangle, up saw, down saw, square) */
AMOD, /* assign mode 0,1 (poly, mono) */
BIT0, /* on-off switch, bit 0 */
BIT1, /* on-off switch, bit 1 */
BIT2, /* on-off switch, bit 2 */
BIT3, /* on-off switch, bit 3 */
BIT4, /* on-off switch, bit 4 */
BIT5, /* on-off switch, bit 5 */
BIT6, /* on-off switch, bit 6 */
BIT7, /* on-off switch, bit 7 */
TRI0, /* -,0,+ switch, bits 0 & 4 */
TRI1, /* -,0,+ switch, bits 1 & 5 */
TRI2, /* -,0,+ switch, bits 2 & 6 */
TRI3, /* -,0,+ switch, bits 3 & 7 */
NM10, /* name 10-char string */
/*
* Irregular parameter types needed for effects & combinations
*/
TWAV, /* waveform 0..1 (SIN, TRI) */
DEL4, /* delay time 0..500 (milliseconds) */
ROUT, /* routing 0..1 (parallel, serial) */
DIS0, /* dis-ena switch, bit 0 */
DIS1, /* dis-ena switch, bit 1 */
DIS2, /* dis-ena switch, bit 2 */
DIS3, /* dis-ena switch, bit 3 */
CHAN, /* MIDI channel 0..15 (displays as 1..16) */
CPAN, /* combination pan 0..13 (A, 9:1 to 1:9, B, C, C+D, D) */
NPRM /* special null entry to mark unused parameter */
} PARA_TYPE;
typedef struct {
int ob_number; /* object number in object tree */
int offset; /* offset in program data structure */
PARA_TYPE type; /* parameter type */
int s_page; /* M1 page in single osc mode */
int d_page; /* M1 page in double osc mode */
int position; /* position in M1 page */
} PARAMETER;
typedef struct {
char *name; /* pointer to string naming the parameter */
PARA_TYPE type; /* parameter type */
int def_val; /* default value */
int data_pos; /* position in effect data (0-7) or -ve for routing */
} EPARAMETER;
typedef struct {
char *name; /* pointer to string naming effect */
EPARAMETER param[8]; /* parameter for each display position */
} EFFECT;
typedef struct {
int bank_nr; /* bank number */
int glob_win; /* window to redraw when global data changed */
int comb_win; /* window to redraw when program data changed */
int prog_win; /* window to redraw when combination data changed */
BYTE data[GLOBAL_SIZE + 100 * COMBINATION_SIZE + 100 * PROGRAM_SIZE];
/* all data */
char filename[FILE_SPEC_SIZE];
} BANK;
typedef enum {
COMB_LIST,
PROG_LIST
} LW_TYPE;
typedef enum {
DRAG_BANK,
DRAG_COMB,
DRAG_PROG
} DRAG_TYPE;